#ifndef _XMLLOADING_H_
#define _XMLLOADING_H_

#include <ext/hash_map>
#include <vector>
#include "extramethods.h"

#include <xercesc/sax/SAXParseException.hpp>
#include <xercesc/sax/ErrorHandler.hpp>

using __gnu_cxx::hash_map;
using __gnu_cxx::hash;

using std::string;




XERCES_CPP_NAMESPACE_USE 

class XMLLoading
            //the first hash_map in the vector is the global variables hash_map
{
    private:
                XMLLoading();
                ~XMLLoading();
        void    XMLLoad(
                    std::vector<hash_map<string, string, hash<string>, eqstr> > &destination
                    ,string url);
        void    displayAll( //for displaying the full content of the vector and its hash_map's
                    std::vector<hash_map<string, string, hash<string>, eqstr> >&destination,
                    string url); 
                    
                         
        friend class ParameterParser;
};

class CustomErrorHandler : public ErrorHandler {
  public:
    void warning(const SAXParseException& e );
    void error(const SAXParseException& e );
    void fatalError(const SAXParseException& e );
    void resetErrors();
    void displayError(const SAXParseException& e );
};

#endif //_XMLLOADING_H_
